package com.web.oa.service;

import com.web.oa.pojo.*;

import java.util.List;

public interface SysService {
    List<MenuTree> loadMenuTree();

    List<SysPermission> findPermissionListByUserId(String userid) throws Exception;

    //查找所有的角色
    List<SysRole> findAllRole();
    //查找所有的菜单
    List<MenuTree> findAllMenu();
    //获取所有菜单权限
    List<SysPermission> findSysPermission();
    //获取所有角色和权限
    List<SysRole> findallRoleAndPermission();

    void addRoleAndPermissions(SysRole role, int[] permissionIds);

    void addSysPermission(SysPermission permission);

    List<SysRole> findAllRoles();

    List<MenuTree> getAllMenuAndPermision();

    List<SysPermission> findPermissionsByRoleId(String roleId);

    void updateRoleAndPermissions(String roleId, int[] permissionIds);

    SysRole findRolesAndPermissionsByUserId(String userId);
}
